import './error.less';

import { history } from '@umijs/max';
import { Button, Space } from 'antd';

import bg404 from '@/assets/403bg.svg';

export default function Error404(props) {
  return (
    <div
      className="page404"
      style={{ background: 'url(' + bg404 + ') 10% 30% no-repeat' }}
    >
      <div className="info-text">
        <h1
          style={{
            fontSize: 78,
            fontWeight: 'bold',
            marginBottom: 20,
          }}
        >
          404
        </h1>
        <div
          style={{
            marginBottom: 30,
            color: '#808695',
            fontSize: 20,
            lineHeight: '28px',
          }}
        >
          抱歉，你访问的页面不存在
        </div>
        <Space>
          <Button
            onClick={() => {
              history.go(-1);
            }}
          >
            返回
          </Button>
          <Button
            onClick={() => {
              history.push('/home');
            }}
            type="primary"
          >
            返回首页
          </Button>
        </Space>
      </div>
    </div>
  );
}
